package com.syedu.cels.entity;

import lombok.Data;

/**
 * description：词汇子类
 * @author Administrator
 * @date 2022/3/21 16:06
 */
@Data
public class Vocabulary extends Base {
    /**特有属性:缩写*/
    private String abbreviation;

    public Vocabulary() {
    }

    public Vocabulary(String en, String[] cns) {
        super(en, cns);
    }

    public Vocabulary(String en, String[] cns, String abbreviation) {
        super(en, cns);
        this.abbreviation = abbreviation;
    }

    @Override
    public String toString() {
        String result = super.toString();
        if (abbreviation != null) {
            result += ",缩写: " + abbreviation;
        }
        return result;
    }
}